package com.cwt_taxi_xa.data;

import com.cwt_taxi_xa.util.AppLog;
import com.cwt_taxi_xa.util.CompareUtil;

public class SijiInfo {
	//认证类型
	int signinTpye;

	//姓名
	String name;

	//司机资格证号
	String sijicode;

	//企业经营许可证号
	String qiyecode ;

	//资格证有效期
	String certificateData;

	//照片本地地址
	String photo;

	//星级1-5
	int star;

	//所属公司(单位名称)
	String companyname;

	//监督电话
	String mobile;

	//二维码一本地地址
	String qrCode1;

	//二维码二本地地址
	String qrCode2;

	//卡号(车牌号)
	String cardnum;
	//签到新加(十九项) 2019-06-04-------------------------------------
	//学期号
	int termNumber;

	//学号
	int studentID;

	//身份证号码
	String identityNumber;

	//地址-字符串，最多 25 个汉字
	String address;

	//年龄
	int age;

	//政治面貌-字符串（1 党员，2 团员，3 群众，4 其他）
	int politicalStatus;

	//年度审核-数字 0 不合格 1 合格
	int annualAudit;

	//从业资格证类别-字符串（0 巡游、1 网约）
	int certificateType;

	// 驾照号-
	String driverLicense;

	//驾驶员性质-字符串（0 聘用，1 车主）
	int driverType;

	//驾照档案编号
	String driverLicenseNumber;

	//驾照签发日期	字符串,YYYYMMDD
	String driverLicenseCD;

	//资格证初次发证日期-字符串,YYYYMMDD
	String certificateCD;

	//发证日期-字符串,YYYYMMDD(不知道什么证书)
	String cardCD;

	//从业资格证状态 0 未激活;1 激活
	int certificateState;

	//监督卡(supervision)----------------------------------
	//状态-0：有效；1：无效
	int supervCardState;

	//类型-0,驾驶员；1,顶班；2,7 天临时卡；3,30 天临时卡
	int supervCardType;

	//开始时间-字符串,YYYYMMDD，临时卡的开始时间
	String supervCardSDate;

	//注销时间-字符串,YYYYMMDD，正式卡，顶班的注销时间
	String supervCardDDate;



	public int getSigninTpye() {
		return signinTpye;
	}

	public void setSigninTpye(int signinTpye) {
		this.signinTpye = signinTpye;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSijicode() {
		return sijicode;
	}

	public void setSijicode(String sijicode) {
		this.sijicode = sijicode;
	}

	public String getQiyecode() {
		return qiyecode;
	}

	public void setQiyecode(String qiyecode) {
		this.qiyecode = qiyecode;
	}

	public String getCertificateData() {
		return certificateData;
	}

	public void setCertificateData(String certificateData) {
		this.certificateData = certificateData;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public int getStar() {
		return star;
	}

	public void setStar(int star) {
		this.star = star;
	}

	public String getCompanyname() {
		return companyname;
	}

	public void setCompanyname(String companyname) {
		this.companyname = companyname;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getQrCode1() {
		return qrCode1;
	}

	public void setQrCode1(String qrCode1) {
		this.qrCode1 = qrCode1;
	}

	public String getQrCode2() {
		return qrCode2;
	}

	public void setQrCode2(String qrCode2) {
		this.qrCode2 = qrCode2;
	}

	public String getCardnum() {
		return cardnum;
	}

	public void setCardnum(String cardnum) {
		this.cardnum = cardnum;
	}



	public int getTermNumber() {
		return termNumber;
	}

	public void setTermNumber(int termNumber) {
		this.termNumber = termNumber;
	}

	public int getStudentID() {
		return studentID;
	}

	public void setStudentID(int studentID) {
		this.studentID = studentID;
	}

	public String getIdentityNumber() {
		return identityNumber;
	}

	public void setIdentityNumber(String identityNumber) {
		this.identityNumber = identityNumber;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public int getPoliticalStatus() {
		return politicalStatus;
	}

	public void setPoliticalStatus(int politicalStatus) {
		this.politicalStatus = politicalStatus;
	}

	public int getAnnualAudit() {
		return annualAudit;
	}

	public void setAnnualAudit(int annualAudit) {
		this.annualAudit = annualAudit;
	}

	public int getCertificateType() {
		return certificateType;
	}

	public void setCertificateType(int certificateType) {
		this.certificateType = certificateType;
	}

	public String getDriverLicense() {
		return driverLicense;
	}

	public void setDriverLicense(String driverLicense) {
		this.driverLicense = driverLicense;
	}

	public int getDriverType() {
		return driverType;
	}

	public void setDriverType(int driverType) {
		this.driverType = driverType;
	}

	public String getDriverLicenseNumber() {
		return driverLicenseNumber;
	}

	public void setDriverLicenseNumber(String driverLicenseNumber) {
		this.driverLicenseNumber = driverLicenseNumber;
	}

	public String getDriverLicenseCD() {
		return driverLicenseCD;
	}

	public void setDriverLicenseCD(String driverLicenseCD) {
		this.driverLicenseCD = driverLicenseCD;
	}

	public String getCertificateCD() {
		return certificateCD;
	}

	public void setCertificateCD(String certificateCD) {
		this.certificateCD = certificateCD;
	}

	public String getCardCD() {
		return cardCD;
	}

	public void setCardCD(String cardCD) {
		this.cardCD = cardCD;
	}

	public int getCertificateState() {
		return certificateState;
	}

	public void setCertificateState(int certificateState) {
		this.certificateState = certificateState;
	}

	public int getSupervCardState() {
		return supervCardState;
	}

	public void setSupervCardState(int supervCardState) {
		this.supervCardState = supervCardState;
	}

	public int getSupervCardType() {
		return supervCardType;
	}

	public void setSupervCardType(int supervCardType) {
		this.supervCardType = supervCardType;
	}

	public String getSupervCardSDate() {
		return supervCardSDate;
	}

	public void setSupervCardSDate(String supervCardSDate) {
		this.supervCardSDate = supervCardSDate;
	}

	public String getSupervCardDDate() {
		return supervCardDDate;
	}

	public void setSupervCardDDate(String supervCardDDate) {
		this.supervCardDDate = supervCardDDate;
	}

	@Override
	public boolean equals(Object object) {
		// TODO Auto-generated method stub
		boolean result = true;
		//二维码不在判断范围
		if(object != null){
			SijiInfo info = (SijiInfo)object;
			if(!CompareUtil.equals(getName(),info.getName())){
				result = false;
			}else if(!CompareUtil.equals(getSijicode(),info.getSijicode())){
				result = false;
			}else if(!CompareUtil.equals(getQiyecode(),info.getQiyecode())){
				result = false;
			}else if(!CompareUtil.equals(getCertificateData(),info.getCertificateData())){
				result = false;
			}/*else if(!CompareUtil.equals(getPhoto(),info.getPhoto())){
				result = false;
			}*/else if(getStar()!= info.getStar()){
				result = false;
			}else if(!CompareUtil.equals(getCompanyname(),info.getCompanyname())){
				result = false;
			}else if(!CompareUtil.equals(getMobile(),info.getMobile())){
				result = false;
			}/*else if(!CompareUtil.equals(getQrCode1(),info.getQrCode1())){
				result = false;
			}else if(!CompareUtil.equals(getQrCode2(),info.getQrCode2())){
				result = false;
			}*/else if(!CompareUtil.equals(getCardnum(),info.getCardnum())){
				result = false;
			}else if(getTermNumber()!=info.getTermNumber()){
				result = false;
			}else if(getStudentID()!=info.getStudentID()){
				result = false;
			}else if(!CompareUtil.equals(getIdentityNumber(),info.getIdentityNumber())){
				result = false;
			}else if(!CompareUtil.equals(getAddress(),info.getAddress())){
				result = false;
			}else if(getAge()!=info.getAge()){
				result = false;
			}else if(getPoliticalStatus()!=info.getPoliticalStatus()){
				result = false;
			}else if(getAnnualAudit()!=info.getAnnualAudit()){
				result = false;
			}else if(!CompareUtil.equals(getDriverLicense(),info.getDriverLicense())){
				result = false;
			}else if(getDriverType()!=info.getDriverType()){
				result = false;
			}else if(!CompareUtil.equals(getDriverLicenseNumber(),info.getDriverLicenseNumber())){
				result = false;
			}else if(!CompareUtil.equals(getDriverLicenseCD(),info.getDriverLicenseCD())){
				result = false;
			}else if(!CompareUtil.equals(getCertificateCD(),info.getCertificateCD())){
				result = false;
			}else if(!CompareUtil.equals(getCardCD(),info.getCardCD())){
				result = false;
			}else if(getCertificateState()!=info.getCertificateState()){
				result = false;
			}else if(getSupervCardState()!=info.getSupervCardState()){
				result = false;
			}else if(getSupervCardType()!=info.getSupervCardType()){
				result = false;
			}else if(!CompareUtil.equals(getSupervCardSDate(), info.getSupervCardSDate())){
				result = false;
			}else if(!CompareUtil.equals(getSupervCardDDate(),info.getSupervCardDDate())){
				result = false;
			}
		}
		AppLog.d("SijiInfo","equals result:" + result);
		return result;
	}

	@Override
	public String toString() {
		return "SijiInfo [name=" + name + ", sijicode=" + sijicode + ", qiyecode=" + qiyecode + ", certificateData=" + certificateData + ", photo=" + photo + ", star=" + star + ", companyname=" + companyname + ", mobile="
				+ mobile + ", qrCode1=" + qrCode1 + ", qrCode2=" + qrCode2 + ", cardnum=" + cardnum + ", termNumber=" + termNumber + ", studentID=" + studentID + ", identityNumber=" + identityNumber + ", address="
				+ address + ", age=" + age + ", politicalStatus=" + politicalStatus + ", annualAudit=" + annualAudit + ", certificateType=" + certificateType + ", driverLicense=" + driverLicense + ", driverType="
				+ driverType + ", driverLicenseNumber=" + driverLicenseNumber + ", driverLicenseCD=" + driverLicenseCD + ", certificateCD=" + certificateCD + ", cardCD=" + cardCD + ", certificateState=" + certificateState
				+ ", supervCardState=" + supervCardState + ", supervCardType=" + supervCardType + ", supervCardSDate=" + supervCardSDate + ", supervCardDDate=" + supervCardDDate + "]";
	}



}
